<?php
function replace_name($t,$a){
    return strtr($t,$a);
}
function rep($from,$to,$str,$num){
	return preg_replace('/'.$from.'/um',$to,$str,$num);
}
function _cp0($items,$n,$sep){
	$a=array();
	foreach($items as $item){
		$a[]=$item.$sep.$n;
	}
	return $a;
}
function cp($text,$fields,$num,$sep){
	$fds=explode("\n",trim($fields,"\n"));
	$fds=array_map('trim',$fds);
	$big=array();
	foreach(range(1,$num) as $n){
		
		$a=array_values($fds);
		$b=call_user_func_array('_cp0',array($a,$n,$sep));
		$format=array_combine($a,$b);
		$text2=strtr($text,$format);
		
		$big[]=$text2;
	}
	
	return implode("\n",$big);
}
class callback_0{
    
    function demo($from,$to,$str){
        return $str."\n".time();
    }
   
    
}

$callback_0=new callback_0();